Show:

Streams chat Class

Renders chat tool.

Constructor

Streams chat

(
  • $options
)

Parameters:

  • $options Array

    Options for the tool

    • publisherId String

      Publisher id of the stream to get messsages from.

    • streamName String

      Required. Name of the stream to get messsages from.

    • [loadMore] String optional

      May have one these values: 'scroll', 'click' or 'pull' which indicates what kind of algorithm will be used for loading new messages. 'scroll' means that new messages will be loaded when scrollbar of the chat cointainer reaches the top (for desktop) or whole document scrollbar reaches the top (for android). 'click' will show label with 'Click to see earlier messages' and when user clicks it, new messages will be loaded. Finally, 'pull' implements 'pull-to-refresh' behavior used in many modern applications today when new messages loaded by rubber-scrolling the container by more amount than it actually begins. Defaults to 'scroll' for desktop and Android devices and 'pull' for iOS devices.

Item Index